﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddNewPartner.ascx.cs"
    Inherits="NLLSite.Administrator.UserControl.AddNewPartner" %>
<style type="text/css">
    .style2
    {
        width: 128px;
    }
    .style6
    {
        width: 434px;
    }
</style>
<script type="text/javascript" src="../../ckfinder/ckfinder.js"></script>
<script type="text/javascript">

    function BrowseServer() {
        // You can use the "CKFinder" class to render CKFinder in a page:
        var finder = new CKFinder();
        finder.basePath = '../../ckfinder/'; // The path for the installation of CKFinder (default = "/ckfinder/").
        finder.selectActionFunction = SetFileField;
        finder.popup();

        // It can also be done in a single line, calling the "static"
        // popup( basePath, width, height, selectFunction ) function:
        // CKFinder.popup( '../', null, null, SetFileField ) ;
        //
        // The "popup" function can also accept an object as the only argument.
        // CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ;
    }

    // This is a sample function which is called when a file is selected in CKFinder.
    function SetFileField(fileUrl) {
        document.getElementById('ctl00_ContentPlaceHolderCenter_AddNewPartner1_TxtimgLink').value = fileUrl;
        //Element ID = Ten class usercontrol + 1 + ID cua text box.
    }

</script>
<div class="box box-100">
    <div class="boxin">
        <div class="header">
            <h3>
                Thêm mới đối tác</h3>
        </div>
        <div style="padding: 18px;">
            <!--<form class="basic" action="" method="post" enctype="multipart/form-data"><!-- Default basic forms -->
            <div class="inner-form">
                <asp:Panel ID="Panel1" runat="server" Width="750px">
                    <table style="width: 100%;">
                        <tr>
                            <td class="style2">
                                Link Ảnh :
                            </td>
                            <td class="style6">
                                <asp:TextBox ID="TxtimgLink" runat="server" Width="300px" AutoPostBack="True"></asp:TextBox>
                                <input type="button" value="Browse" onclick="BrowseServer();" style="width: 89px"
                                    class="altbutton" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtimgLink"
                                    ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Linh Banner :
                            </td>
                            <td class="style6">
                                <asp:TextBox ID="TxtBanLink" runat="server" Width="300px"></asp:TextBox>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtBanLink"
                                    ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;
                            </td>
                            <td class="style6">
                                <asp:Label ID="LblCheck" runat="server"></asp:Label>
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;
                            </td>
                            <td class="style6">
                                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Thêm Mới" CssClass="altbutton" />
                                &nbsp;
                                <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Thiết Lập Lại"
                                    CssClass="altbutton" />
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </div>
</div>
